.carousel-container {
    position: relative;
    width: 100%;
    margin-bottom: var(--theme-spacing-xl);
    container-type: inline-size;
    overflow: hidden;
    border-radius: var(--theme-radius-lg);
}

.carousel {
    position: relative;
    display: grid;
    grid-template-columns: repeat(var(--items-per-row, 1), 1fr);
    gap: var(--theme-spacing-md);
    width: 100%;
    min-height: 400px;
    padding: 0 var(--theme-spacing-xl);
    overflow: hidden;
}

.carousel-item {
    position: relative;
    width: 100%;
    min-height: 440px;
    overflow: hidden;
    border-radius: var(--theme-radius-lg);
    isolation: isolate;
}

.carousel-item :global(.overlay) {
    border-radius: var(--theme-radius-md);
}

.carousel-link {
    display: block;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: var(--theme-spacing-md);
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    height: 100%;
    min-height: 440px;
    padding: var(--theme-spacing-xl);
}

.title-section {
    display: flex;
    flex-shrink: 0;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    height: 60px;
    min-height: 60px;
    max-height: 60px;
    text-align: left;
}

.image-section {
    position: relative;
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 250px;
    min-height: 250px;
    max-height: 250px;
}

.play-button-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 20;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
}

.image-section:hover .play-button-overlay {
    pointer-events: auto;
    opacity: 1;
}

.metadata-section {
    display: flex;
    flex-shrink: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100px;
    min-height: 100px;
    max-height: 100px;
    text-align: center;
}

.image-link {
    display: block;
    transition: transform 0.3s ease;
}

.image-link:hover {
    transform: scale(1.02);
}

.image-link:active {
    transform: scale(0.98);
}

.album-image-container {
    position: relative;
    width: 100%;
    max-width: 180px;
    overflow: hidden;
    border-radius: var(--theme-radius-lg);
    filter: drop-shadow(0 10px 30px rgb(0 0 0 / 50%)) drop-shadow(0 4px 12px rgb(0 0 0 / 40%));
    transition: filter 0.3s ease;
}

.album-image-container::before {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    width: 100%;
    height: 100%;
    pointer-events: none;
    content: '';
    background-color: rgb(0 0 0 / 0%);
    border-radius: var(--theme-radius-lg);
    transition: background-color 0.3s ease;
}

.image-section:hover .album-image-container::before {
    background-color: rgb(0 0 0 / 40%);
}

.album-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: var(--theme-radius-lg);
}

.carousel-item:hover .album-image-container,
.carousel-link:hover .album-image-container {
    filter: drop-shadow(0 16px 40px rgb(0 0 0 / 60%)) drop-shadow(0 6px 16px rgb(0 0 0 / 50%));
}

.artist-link {
    display: inline-block;
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.artist-link:hover {
    opacity: 0.8;
}

.title {
    margin-bottom: var(--theme-spacing-xs);
    color: white;
    text-shadow: 0 0 10px rgb(0 0 0 / 50%);
}

.artist {
    color: white;
    text-shadow: 0 0 10px rgb(0 0 0 / 50%);
}

.nav-arrow-left,
.nav-arrow-right {
    position: absolute;
    top: 50%;
    z-index: 20;
    border: 1px solid rgb(255 255 255 / 25%);
    backdrop-filter: blur(10px);
    transform: translateY(-50%);
    transition: all 0.2s ease;
}

.nav-arrow-left {
    left: var(--theme-spacing-xs);
}

.nav-arrow-right {
    right: var(--theme-spacing-xs);
}

.nav-arrow-left:hover,
.nav-arrow-right:hover {
    background: transparent !important;
    border-color: rgb(255 255 255 / 35%);
    transform: translateY(-50%) scale(1.1);
}

.nav-arrow-left:active,
.nav-arrow-right:active {
    transform: translateY(-50%) scale(0.95);
}

@container (min-width: $mantine-breakpoint-xs) {
    .carousel-item {
        min-height: 480px;
    }

    .content {
        min-height: 480px;
    }

    .title-section {
        height: 60px;
        min-height: 60px;
        max-height: 60px;
    }

    .image-section {
        height: 300px;
        min-height: 300px;
        max-height: 300px;
    }

    .metadata-section {
        height: 80px;
        min-height: 80px;
        max-height: 80px;
    }

    .album-image-container {
        max-width: 160px;
    }
}

@container (min-width: $mantine-breakpoint-sm) {
    .carousel {
        gap: var(--theme-spacing-lg);
    }

    .carousel-item {
        min-height: 500px;
    }

    .content {
        min-height: 500px;
    }

    .title-section {
        height: 70px;
        min-height: 70px;
        max-height: 70px;
    }

    .image-section {
        height: 280px;
        min-height: 280px;
        max-height: 280px;
    }

    .metadata-section {
        height: 110px;
        min-height: 110px;
        max-height: 110px;
    }

    .album-image-container {
        max-width: 200px;
    }
}

@container (min-width: $mantine-breakpoint-md) {
    .carousel-item {
        min-height: 550px;
    }

    .content {
        min-height: 550px;
    }

    .title-section {
        height: 80px;
        min-height: 80px;
        max-height: 80px;
    }

    .image-section {
        height: 320px;
        min-height: 320px;
        max-height: 320px;
    }

    .metadata-section {
        height: 120px;
        min-height: 120px;
        max-height: 120px;
    }

    .album-image-container {
        max-width: 220px;
    }
}

@container (min-width: $mantine-breakpoint-xl) {
    .carousel-item {
        min-height: 600px;
    }

    .content {
        min-height: 600px;
    }

    .title-section {
        height: 90px;
        min-height: 90px;
        max-height: 90px;
    }

    .image-section {
        height: 360px;
        min-height: 360px;
        max-height: 360px;
    }

    .metadata-section {
        height: 130px;
        min-height: 130px;
        max-height: 130px;
    }

    .album-image-container {
        max-width: 240px;
    }
}
